package com.maxMgmt.Mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.maxMgmt.Dto.ProductsDto;

public class ProductsMapper implements RowMapper{

	@Override
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		
		ProductsDto productsDto = new ProductsDto();
		
		productsDto.setProductId(rs.getInt("PRODUCT_ID"));
		productsDto.setProductName(rs.getString("PRODUCT_NAME"));
		productsDto.setProductDesc(rs.getString("PRODUCT_DESC"));
		
		return productsDto;
	}

}
